unit TargetMSSQL;

interface

uses
  SysUtils, Classes, DB;

type
  TdmMSSQL = class(TDataModule)
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  function GetFirebirdFieldType(FieldType: TFieldType): AnsiString;

var
  dmMSSQL: TdmMSSQL;

implementation

{$R *.dfm}

function GetFirebirdFieldType(FieldType: TFieldType): AnsiString;
begin
  Result := '';
  case FieldType of
    ftUnknown: Result := 'varchar(50)';
    ftString: Result := 'varchar(50)';
    ftSmallint: Result := 'numeric';
    ftInteger: Result := 'numeric';
    ftWord: Result := 'numeric';
    ftBoolean: Result := 'numeric';
    ftFloat: Result := 'numeric';
    ftCurrency: Result := 'numeric';
    ftBCD: Result := 'numeric';
    ftDate: Result := 'datetime';
    ftTime: Result := 'datetime';
    ftDateTime: Result := 'numeric';
    ftBytes: Result := 'numeric';
    ftVarBytes: Result := 'numeric';
    ftAutoInc: Result := 'numeric';
    ftBlob: Result := 'ntext';
    ftMemo: Result := 'varchar(1000)';
    ftGraphic: Result := 'ntext';
    ftFmtMemo: Result := 'varchar(1000)';
    ftParadoxOle: ;
    ftDBaseOle: ;
    ftTypedBinary: Result := 'ntext';
    ftCursor: ;
    ftFixedChar: ;
    ftWideString: Result := 'varchar(1000)';
    ftLargeint: Result := 'numeric';
    ftADT: ;
    ftArray: ;
    ftReference: ;
    ftDataSet: ;
    ftOraBlob: Result := 'ntext';
    ftOraClob: Result := 'ntext';
    ftVariant: Result := 'varchar(50)';
    ftInterface: Result := 'numeric';
    ftIDispatch: Result := 'numeric';
    ftGuid: Result := 'numeric';
    ftTimeStamp: Result := 'datatime';
    ftFMTBcd: ;
    ftFixedWideChar: Result := 'varchar(50)';
    ftWideMemo: Result := 'varchar(1000)';
    ftOraTimeStamp: Result := 'datatime';
    ftOraInterval: Result := 'datatime';
  end;
end;

end.
